package com.yunpeng.aidevice.common.dto.save;

import com.alibaba.fastjson.JSONArray;
import com.yunpeng.common.enums.UserSexEnum;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * UserSaveDTO 用户保存数据对象
 *
 * @author : Moore(hemw)
 * @date : 2020-04-13
 */
public class UserSaveDTO implements Serializable {

    /**
     * 用户代码
     */
    private String userCode;
    /**
     * 名称
     */
    private String userName;
    /**
     * 用户编号
     */
    private String userNumber;
    /**
     * 手机号码
     */
    private String phone;
    /**
     * 组织部门代码
     */
    private String orgCode;
    /**
     * 组织部门编号
     */
    private String orgNumber;
    /**
     * 性别
     */
    private Integer sex;
    /**
     * 有效期
     */
    private LocalDateTime invalidDate;
    /**
     * 邮箱
     */
    private String email;
    /**
     * 人脸照片地址
     */
    private JSONArray faceImages;

    /**
     * 商户代码
     */
    private String merchantCode;

    /**
     * 商户默认用户
     */
    private Boolean merchantDefaultUser;

    /**
     * 租户代码
     */
    private String tenantCode;

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getUserNumber() {
        return userNumber;
    }

    public void setUserNumber(String userNumber) {
        this.userNumber = userNumber;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getOrgCode() {
        return orgCode;
    }

    public void setOrgCode(String orgCode) {
        this.orgCode = orgCode;
    }

    public String getOrgNumber() {
        return orgNumber;
    }

    public void setOrgNumber(String orgNumber) {
        this.orgNumber = orgNumber;
    }

    public Integer getSex() {
        if (sex == null) {
            sex = UserSexEnum.unknown.getValue();
        }
        return sex;
    }

    public void setSex(Integer sex) {
        this.sex = sex;
    }

    public LocalDateTime getInvalidDate() {
        return invalidDate;
    }

    public void setInvalidDate(LocalDateTime invalidDate) {
        this.invalidDate = invalidDate;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public JSONArray getFaceImages() {
        return faceImages;
    }

    public void setFaceImages(JSONArray faceImages) {
        this.faceImages = faceImages;
    }

    public String getMerchantCode() {
        return merchantCode;
    }

    public void setMerchantCode(String merchantCode) {
        this.merchantCode = merchantCode;
    }

    public String getUserCode() {
        return userCode;
    }

    public void setUserCode(String userCode) {
        this.userCode = userCode;
    }

    public Boolean getMerchantDefaultUser() {
        return merchantDefaultUser;
    }

    public void setMerchantDefaultUser(Boolean merchantDefaultUser) {
        this.merchantDefaultUser = merchantDefaultUser;
    }

    public String getTenantCode() {
        return tenantCode;
    }

    public void setTenantCode(String tenantCode) {
        this.tenantCode = tenantCode;
    }

    @Override
    public String toString() {
        return "UserSaveDTO{" +
                "userCode='" + userCode + '\'' +
                ", userName='" + userName + '\'' +
                ", userNumber='" + userNumber + '\'' +
                ", phone='" + phone + '\'' +
                ", orgCode='" + orgCode + '\'' +
                ", orgNumber='" + orgNumber + '\'' +
                ", sex=" + sex +
                ", invalidDate=" + invalidDate +
                ", email='" + email + '\'' +
                ", faceImages=" + faceImages +
                ", merchantCode='" + merchantCode + '\'' +
                ", merchantDefaultUser='" + merchantDefaultUser + '\'' +
                ", tenantCode='" + tenantCode + '\'' +
                '}';
    }
}
